package com.ch.common.base.activity

import android.os.Bundle
import android.util.Log
import androidx.databinding.ViewDataBinding
import com.alibaba.android.arouter.launcher.ARouter
import com.ch.common.base.viewModel.BaseLibViewModel
import com.ch.common.base.viewModel.BaseViewModel


abstract class BaseActivity<VM : BaseViewModel, DB : ViewDataBinding> :
    BaseLibActivity<VM, DB>() {

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(getLayoutResID())
        ARouter.getInstance().inject(this)
        initView()
    }

    abstract fun getLayoutResID(): Int
    abstract fun initView()
}